using Irony.Parsing;

namespace Flit.Tests
{
    public class ParserTestBase
    {
        protected static Graph Parse(string context)
        {
            ParseTree tree = Parser().Parse(context);
            ParseTreeNode node = tree.Root;
            return node.AstNode as Graph;
        }

        protected static Parser Parser()
        {
            return new Parser(new FlitGrammar());
        }
    }
}